package com.effectiv.gooruda.domain;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Email;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ToString
@Document(collection="t_tenant")
public class Tenant extends PersistentObject{
	
	
	@Indexed(unique=true)
	@Email
	@Getter @Setter
	private String email;
	
	@NotNull
	@Getter @Setter
	private String name;
	
	@Getter @Setter
	private String password;
	
	
	@Getter @Setter
	@DBRef
	private Lov role;
	
	@Getter @Setter
	private boolean active;
	
}
